#include "devices.h"
#include "qr.h"

#include <string.h>

using namespace std;

int main()
{
	cout << "Hello demo qr." << endl;

	qr::init();
	char * str = qr::getInfo();
	printf("return info is : \n%s\n", str);
	qr::close();

	qr::init();
	int ret = qr::getStatus();
	printf("return state is : %d\n", ret);
	qr::close();

	qr::init();
	char *data = (char *)malloc(data_size);
	memset(data, 0, data_size);
	int err = qr::doQr(data, data_size);
	free(data);
	printf("return data is : \n%s\n", data);
	qr::close();

	return 0;
}
